package com.demo.designmode.adapter.objectadapter;

import com.demo.designmode.adapter.classadapter.Computer;
import com.demo.designmode.adapter.classadapter.SDCard;
import com.demo.designmode.adapter.classadapter.SDCardImpl;
import com.demo.designmode.adapter.classadapter.TFCardImpl;

/**
 * @Author: jxm
 * @Description: 对象适配器模式测试
 * @Date: 2023-12-13 9:58
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        Computer computer = new Computer();
        SDCard sdCard = new SDCardImpl();
        System.out.println(computer.readSD(sdCard));

        System.out.println("------------");
        TFCardImpl tfCard = new TFCardImpl();
        SDAdapterTF adapter = new SDAdapterTF(tfCard);
        System.out.println(computer.readSD(adapter));

    }
}
